Silk Road forums

Support => Feature requests => Topic started by: TravellingWithoutMoving on December 11, 2011, 10:20 am

Title: Bitcoin chart forum integration to track rate fluctuation
Post by: TravellingWithoutMoving on December 11, 2011, 10:20 am
http://bitcoincharts.com/about/markets-api/

Bitcoincharts provides a simple API to most of its data. You can use this API to include markets data in your websites, mobile apps or desktop applets. Please remember to add a link to Bitcoincharts!

    Bitcoincharts' API is accessable through HTTP
    Parameters are passed using GET-requests
    returned data is JSON encoded
    Don't query more often than once every 15 minute

Markets Data

You can access general market data at http://bitcoincharts.com/t/markets.json. This will return an array with elements for each market. Returned fields per market are:

    symbol
    short name for market
    currency
    base currency of the market (USD, EUR, RUB, JPY, ...)
    bid
    highest bid price
    ask
    lowest ask price
    latest_trade
    unixtime of latest trade. Following fields relate to the day of this field (UTC)!
    n_trades
    number of trades
    open
    first trade of day
    high
    highest trade during day
    low
    lowest trade during day
    close
    latest trade
    previous_close
    atest trade of previous day
    volume
    total trade volume of day in BTC
    currency_volume
    total trade volume of day in currency

Historic Trade Data

Trade data is available as CSV, delayed by approx. 15 minutes.

http://bitcoincharts.com/t/trades.csv?symbol=SYMBOL[&start=UNIXTIME][&end=UNIXTIME]
returns CSV:

unixtime,price,amount

Without start or end set it'll return the last few days (this might change!).

Examples

Latest mtgoxUSD trades:
http://bitcoincharts.com/t/trades.csv?symbol=mtgoxUSD

All bcmPPUSD trades:
http://bitcoincharts.com/t/trades.csv?symbol=bcmPPUSD&start=0

btcexYAD trades from a range:
http://bitcoincharts.com/t/trades.csv?symbol=btcexYAD&start=1303000000&end=1303100000



 :D :D
Title: Re: Bitcoin chart forum integration to track rate fluctuation
Post by: TravellingWithoutMoving on December 14, 2011, 12:34 pm
...or just link to these :-
http://bitcoincharts.com/charts/btceUSD#permalinkbox

http://bitcoincharts.com/charts/britcoinGBP#permalinkbox

http://bitcoincharts.com/charts/bitmarketEUR#permalinkbox
Title: Re: Bitcoin chart forum integration to track rate fluctuation
Post by: Variety Jones on December 19, 2011, 09:52 am
Tor's latency and bandwidth limitations make it a bit difficult, and no one likes surface links.

What we should do is find someone who can create FF plugins (with open, audited and signed code of course!) or even use GreaseMonkey so members could add the feature as a drop down or pop up page within their browser and available instantly.

It's a great idea.

What's the pertinent info that needs to be shown, and what's superfluous to needs?
Title: Re: Bitcoin chart forum integration to track rate fluctuation
Post by: TravellingWithoutMoving on December 20, 2011, 04:03 pm
- there shouldnt be a bandwidth issue if the chart is updated every 30mins or so thats all thats required, per sec or min is overkill.
- if varietyjones' suggestion achieves the same and its "safer" then thats a better route to take.

Title: Re: Bitcoin chart forum integration to track rate fluctuation
Post by: Variety Jones on December 21, 2011, 12:29 am
It's not a case of how often the chart is updated.

It's a case of how often users push CTRL-F5.

Charts are complex images that don't compress well without bad artifacting.

A single one could have 10 X the data load compared the the image heavy front page on SR.

It could easily double the data bandwidth requirements for the site, or even more if people viewed the chart only 20% as often as they viewed the front page.

If it was any higher than that, the site would crawl to an absolute halt.

So yes, it's purely a bandwidth issue. There's a limited amount of bandwidth a tor site can push out, and once it's reached, you're fucked.
Title: Re: Bitcoin chart forum integration to track rate fluctuation
Post by: TravellingWithoutMoving on December 21, 2011, 05:52 pm
..the chart.png is 7k in size.
Title: Re: Bitcoin chart forum integration to track rate fluctuation
Post by: TravellingWithoutMoving on January 10, 2012, 02:30 pm
bump
Title: Re: Bitcoin chart forum integration to track rate fluctuation
Post by: doublemint on January 12, 2012, 10:59 pm
Yeah, I always keep mtgox up when dealing with BTC, you never know when they're going to drop and then you are out $100...